home *** CD-ROM | disk | FTP | other *** search
- package tetris;
-
- import java.util.Timer;
- import javax.microedition.lcdui.Canvas;
- import javax.microedition.lcdui.Command;
- import javax.microedition.lcdui.CommandListener;
- import javax.microedition.lcdui.Display;
- import javax.microedition.lcdui.Displayable;
- import javax.microedition.lcdui.Graphics;
- import javax.microedition.lcdui.Image;
-
- public class Splash extends Canvas implements CommandListener {
- // $FF: renamed from: i javax.microedition.lcdui.Image
- private Image field_0;
- // $FF: renamed from: t java.util.Timer
- Timer field_1;
-
- public Splash() {
- try {
- this.jbInit();
- } catch (Exception e) {
- ((Throwable)e).printStackTrace();
- }
-
- }
-
- private void jbInit() throws Exception {
- try {
- this.field_0 = Image.createImage("/tetris/splash.png");
- } catch (Exception e) {
- ((Throwable)e).printStackTrace();
- this.field_0 = null;
- }
-
- ((Displayable)this).setCommandListener(this);
- this.field_1 = new Timer();
- this.field_1.schedule(new SplashTask(), 3000L);
- ((Canvas)this).repaint();
- }
-
- public void commandAction(Command command, Displayable displayable) {
- }
-
- public static void back() {
- Display.getDisplay(TetrisMIDlet.instance).setCurrent(TetrisMIDlet.mainMenu);
- }
-
- protected void keyPressed(int keyCode) {
- this.field_1.cancel();
- back();
- }
-
- protected void paint(Graphics g) {
- g.setColor(16777215);
- g.fillRect(0, 0, ((Canvas)this).getWidth(), ((Canvas)this).getHeight());
- if (this.field_0 != null) {
- g.drawImage(this.field_0, 0, 0, 20);
- }
-
- }
- }
-